package com.noble.meether.logic.offline.bean;

import com.noble.library.base.bean.BaseData;
import com.noble.library.log.PLogger;
import com.noble.meether.chat.msgtype.base.BaseMessage;

/**
 * 离线消息实体类
 * Created by Su on 2017/5/25.
 */
public class OfflineBean extends BaseData {
    private BaseMessage baseMessage;

    @Override
    public void parseJson(String jsonStr) {
        String jsonContent = getJsonObject(jsonStr).optString("JsonContent");
        PLogger.d("offlineMsg:  " + jsonContent);

        baseMessage = new BaseMessage();
        baseMessage.parseJson(jsonContent);

        baseMessage.setIsSender(0);
        baseMessage.setWhisperId(baseMessage.getLuidFrom());
    }

    public BaseMessage getBaseMessage() {
        return baseMessage;
    }
}
